package com.bitmain.mmst.domain;

import com.bitmain.mmst.core.base.BasicDomain;

/**
 * 
 * 领域模型：矿机状态
 * @author Richard - rui.wu@bitmain.com
 * @since 2016��7��12�� 
 *
 */
public class MinerState extends BasicDomain{
	private static final long serialVersionUID = 7691041295937581298L;

	/**
	 * 矿机类型
	 */
	private String minerType;
	
	/**
	 * 所属机架名称
	 */
	private String shelfName;
	
	/**
	 * 所属机架Id
	 */
	private long shelfId;
	
	/**
	 * 矿机IP
	 */
	private String host;
	
	/**
	 * 矿机IP最后一位
	 */
	private Integer ipIndex;
	
	/**
	 * 矿机mac地址
	 */
	private String mac;
	
	/**
	 * 矿机能否ping通
	 */
	private Boolean pingable;
	
	/**
	 * 矿机能否获取mac地址
	 */
	private Boolean macable;
	
	/**
	 * 矿机能否获取pools信息
	 */
	private Boolean poolsable;
	
	/**
	 * 矿机能否获取stats信息
	 */
	private Boolean statsable;
	
	/**
	 * 矿机能否获取summary信息
	 */
	private Boolean summaryable;
	
	private Boolean commandable;

	private Long detectTime;
	
	private MinerDetectPool[] pools;
	
	private String firmwareVersion;
	
	public long getShelfId() {
		return shelfId;
	}

	public void setShelfId(long shelfId) {
		this.shelfId = shelfId;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public Integer getIpIndex() {
		return ipIndex;
	}

	public void setIpIndex(Integer ipIndex) {
		this.ipIndex = ipIndex;
	}

	public String getMac() {
		return mac;
	}

	public void setMac(String mac) {
		this.mac = mac;
	}

	public Boolean getPingable() {
		return pingable;
	}

	public void setPingable(Boolean pingable) {
		this.pingable = pingable;
	}

	public Boolean getMacable() {
		return macable;
	}

	public void setMacable(Boolean macable) {
		this.macable = macable;
	}

	public Boolean getPoolsable() {
		return poolsable;
	}

	public void setPoolsable(Boolean poolsable) {
		this.poolsable = poolsable;
	}

	public Boolean getStatsable() {
		return statsable;
	}

	public void setStatsable(Boolean statsable) {
		this.statsable = statsable;
	}

	public Boolean getSummaryable() {
		return summaryable;
	}

	public void setSummaryable(Boolean summaryable) {
		this.summaryable = summaryable;
	}

	public Boolean getCommandable() {
		return commandable;
	}

	public void addCommandable(Boolean able) {
		if(able==null){
			return;
		}
		if(commandable==null){
			commandable = true;
		}
		commandable &= able;
	}

	public Long getDetectTime() {
		return detectTime;
	}

	public void setDetectTime(Long detectTime) {
		this.detectTime = detectTime;
	}

	public MinerDetectPool[] getPools() {
		return pools;
	}

	public void setPools(MinerDetectPool[] pools) {
		this.pools = pools;
	}

	public String getFirmwareVersion() {
		return firmwareVersion;
	}

	public void setFirmwareVersion(String firmwareVersion) {
		this.firmwareVersion = firmwareVersion;
	}

	public String getMinerType() {
		return minerType;
	}

	public void setMinerType(String minerType) {
		this.minerType = minerType;
	}

	public String getShelfName() {
		return shelfName;
	}

	public void setShelfName(String shelfName) {
		this.shelfName = shelfName;
	}
}
